﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace UI.Tools
{
    /// <summary>
    /// API 的摘要说明
    /// </summary>
    public class Admin : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            WeiXin wx = new WeiXin();
            string area = HttpContext.Current.Request["area"];
            string url = wx.FindUrl(area, "Admin");
            string result = string.Empty;            
           
            using (System.IO.StreamReader sr = new System.IO.StreamReader(context.Request.InputStream))
            {
                
                string postParam = sr.ReadLine();
                result = wx.HttpPost(url, postParam);
            }
            context.Response.Write(result);
            context.Response.End();
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}